package d3_buffered_reader;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

/**
 * 2024/6/18 掌握字符缓冲输出流的用法 Cjj 15:50
 */
public class BufferedWriterTest2 {
    public static void main(String[] args) {

        try (
                Writer fw= new FileWriter("file-io2\\src\\test\\BufferedWriter");
                BufferedWriter bw= new BufferedWriter(fw);

      ){
          bw.write('a');
          bw.write(97);
          bw.write('成');
          bw.newLine();

          bw.write("我爱你中国abc");
          bw.newLine();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
